package ru.nosport.matrixaria.core;

/**
 * User: vfabr
 * Date: 24.11.2006
 * Time: 16:14:38
 */
public class CoreException extends Exception {
	public CoreException(String _message) {
		super(_message);
	}

	/**
     *
     * @param _message -
     * @param _cause -
     */
    public CoreException(String _message, Throwable _cause) {
        super(_message, _cause);
    }

    /**
     *
     * @param _cause -
     */
    public CoreException(Throwable _cause) {
        super(_cause);
    }

	@Override
	public String getMessage(){
		StringBuffer ret = new StringBuffer();

		ret.append(super.getMessage()).append("\n");

		StackTraceElement[] els = this.getStackTrace();

		for(StackTraceElement tmp : els){
			ret.append(tmp.toString()).append("\n");
		}

		return ret.toString();
	}
}
